<template>
	<view>
		<u-navbar title="我的项目" :autoBack="true" :placeholder="true"></u-navbar>
		<!-- 项目状态 -->
		<view class="item_box flexA">
			<view class="item_label">项目状态</view>
			<!--  '审核状态:1=审核中,2=审核成功,3=审核失败' -->
			<template v-if="item.status===1">
				<view class="item_right status01">审核中</view>
			</template>
			<template v-if="item.status===2">
				<view class="item_right status02">审核成功</view>
			</template>
			<template v-if="item.status===3">
				<view class="item_right status03">审核失败</view>
			</template>
		</view>
		<view class="line"></view>
		<!-- 失败原因 -->
		<template v-if="item.status ===3">
			<view class="item_box flexA">
				<view class="item_label status03">失败原因</view>
				<view class="item_right ellipsis status03">{{item.turn_mess}}</view>
			</view>
		</template>
		<!-- 服务名称 -->
		<view class="item_box flexA">
			<view class="item_label">服务名称</view>
			<view class="item_right ellipsis">{{item.name}}</view>
		</view>
		<view class="line"></view>
		<!-- 服务类型 -->
		<view class="item_box flexA">
			<view class="item_label">服务类型</view>
			<view class="item_right flexA">
				<view class="item_check flexA" style="margin-right: 60rpx;">
					<image v-if="item.service_type===1" src="http://qiniu.suboshimuying.cn/static/merchant/ic_checkeds.png"
						mode="">
					</image>
					<image v-else src="http://qiniu.suboshimuying.cn/static/order/icon24@2x.png" mode=""></image>
					<view class="">上门</view>
				</view>
				<view class="item_check flexA">
					<image v-if="item.service_type===2" src="http://qiniu.suboshimuying.cn/static/merchant/ic_checkeds.png"
						mode="">
					</image>
					<image v-else src="http://qiniu.suboshimuying.cn/static/order/icon24@2x.png" mode=""></image>
					<view class="">到店</view>
				</view>
			</view>
		</view>
		<view class="line"></view>
		<!-- 所在城市 -->
		<view class="item_box flexA">
			<view class="item_label">所在城市</view>
			<view class="item_right ellipsis">{{item.newarea.name}}</view>
		</view>
		<view class="line"></view>
		<!-- 具体地址 -->
		<view class="item_box flexA">
			<view class="item_label">具体地址</view>
			<view class="item_right ellipsis">{{item.adress_det}}</view>
		</view>
		<view class="line"></view>
		<!-- 详情 -->
		<view class="item_box flexA">
			<view class="item_label">详情</view>
			<view class="item_right ellipsis">{{item.detail_text}}</view>
		</view>
		<view class="line"></view>
		<!-- 图片 -->
		<view class="pic_box flexA">
			<image :src="it" mode="" v-for="(it,idx) in item.goods_images" :key="idx"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item: {}
			};
		},
		onLoad(option) {
			this.item = JSON.parse(option.item)
			console.log(this.item.goods_images);
			console.log(option);
		}
	}
</script>

<style>
	page {
		background-color: #fff;
	}
</style>

<style lang="scss" scoped>
	.line {
		width: 686rpx;
		height: 2rpx;
		opacity: 1;
		background: rgba(248, 249, 254, 1);
	}

	.ellipsis {
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.status01 {
		color: #FF7832 !important;
	}

	.status02 {
		color: #806EFE !important;
	}

	.status03 {
		color: #FC4338 !important;
	}

	.item_box {
		padding: 32rpx;

		.item_label {
			min-width: 164rpx;
			color: rgba(0, 0, 0, 0.26);
			font-size: 28rpx;
		}

		.item_right {
			// width: 400rpx;
			color: rgba(0, 0, 0, 0.8);
			font-size: 28rpx;

			.item_check {
				image {
					width: 36rpx;
					height: 36rpx;
					margin-right: 8rpx;
				}

				view {
					color: rgba(53, 54, 79, 1);
					font-size: 28rpx;
				}
			}
		}
	}

	.pic_box {
		flex-wrap: wrap;
		margin-top: 32rpx;
		margin-left: 32rpx;

		image {
			margin-right: 16rpx;
			margin-bottom: 16rpx;
			width: 218rpx;
			height: 218rpx;
			border-radius: 12rpx;
			opacity: 1;
		}
	}
</style>
